package com.stj.entity;

import java.util.Date;

public class comment {
    private int id;
    private int blogId;
    private String content;
    private String userIp;
    private Date createData;
    private int state;
    private Blog blog;


    public comment() {
    }

    public comment(int blogId, String content) {
        this.blogId = blogId;
        this.content = content;
    }
    public comment(int blogId, String content, String userIp,  int state) {
        this.blogId = blogId;
        this.content = content;
        this.userIp = userIp;
        this.state = state;
    }
    public comment(int blogId, String content, String userIp, Date createData, int state) {
        this.blogId = blogId;
        this.content = content;
        this.userIp = userIp;
        this.createData = createData;
        this.state = state;
    }

    public comment(int id, String userIp, Integer blogId, String content, Date createData, Integer state) {
        this.id = id;
        this.blogId = blogId;
        this.content = content;
        this.userIp = userIp;
        this.createData = createData;
        this.state = state;
    }

    public Blog getBlog() {return blog; }

    public void setBlog(Blog blog) {this.blog = blog;}
    public int getId() {return id;}

    public void setId(int id) {this.id = id; }

    public String getUserIp() {return userIp;}

    public void setUserIp(String userIp) { this.userIp = userIp;}

    public Date getCreateData() {return createData;}

    public void setCreateData(Date createData) {this.createData = createData;}

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getBlogId() {return blogId;}

    public void setBlogId(int blogId) {this.blogId = blogId;}

    public String getContent() { return content; }

    public void setContent(String content) {this.content = content; }

    @Override
    public String toString() {
        return "comment{" +
                "blogId=" + blogId +
                ", content='" + content + '\'' +
                '}';
    }
}
